<template>
  <view>
    <view class="b-w b-shadow item">
      <view class="flex-x-c">
        <u-avatar class="avator" size="50" @click="handleDetail" :src="info.avatar"></u-avatar>
        <view class="name" @click="handleDetail">
          <view class="flex-x-c">
            <view class="user-name">{{ info.name }}</view>
            <u-icon name="arrow-right" size="13"></u-icon>
          </view>
          <!-- <view class="icon">
            <u-tag text="博士" size="mini"></u-tag>
          </view> -->
        </view>
      </view>
      <view class="flex-x-c stand-item" v-if="info.targetCompany">
        <view class="label">建站单位:</view>
        <view>{{ info.targetCompany }}</view>
      </view>
      <view class="flex-x-c stand-item">
        <view class="label">建站对象:</view>
        <view>{{ info.targetName }}</view>
      </view>
      <view class="flex-x-c stand-item">
        <view class="label">联系方式:</view>
        <view>{{ info.mobile }}</view>
      </view>
      <view class="flex-x-c stand-item">
        <view class="label" style="width: 250rpx">是否达成建站共识:</view>
        <view>{{ info.isReach ? '是' : '否' }}</view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  props: {
    info: {
      type: Object,
      default: () => {},
    },
  },
  methods: {
    handleDetail() {
      let url = ''
      if (this.info.identifying == 'professional') {
        url = `/pages/form/workerForm`
      } else {
        url = `/pages/form/company`
      }
      url += `?userId=${this.info.userId}&myself=1`
      this.$routeUtils.navigateTo({ url })
    },
  },
}
</script>

<style scoped lang="scss">
.label {
  width: 150rpx;
}
.stand-item {
  margin-top: 20rpx;
}
.item {
  margin-bottom: 20rpx;
  border-radius: 10rpx;
  padding: 20rpx;
}
.avator {
  width: 150rpx;
  height: 150rpx;
}
.name {
  margin-left: 20rpx;
  .user-name {
    margin-right: 20rpx;
  }
}
.icon {
  display: inline-block;
  margin-top: 15rpx;
}
</style>
